/*
 * FileName: Receiver.java
 * Author:   zzw
 * Date:     2018年05月23日
 * Description:
 *//*

package com.chezhibao.trace.listenter;

import com.chezhibao.trace.vo.Message;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.hadoop.hbase.HbaseTemplate;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

import java.io.IOException;

*/
/**
 * 〈消息接收〉<br>
 * 〈消息接收〉
 *
 * @author zzw
 * @see [相关类/方法]（可选）
 * @since [产品/模块版本]（可选）
 *//*

@Component
public class Receiver {

    @Autowired
    private HbaseTemplate hbaseTemplate;

    @Autowired
    private ObjectMapper objectMapper;

    @KafkaListener(topics = "test2")
    public void listen(ConsumerRecord<?, ?> record) throws IOException {
        String value = (String) record.value();
        Message message = objectMapper.readValue(value.getBytes(), Message.class);
        hbaseTemplate.put("trace",message.getRpcId(),"rpc","msg",value.getBytes());
    }
}
*/
